//
//  moreBanlirenTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2019/1/7.
//  Copyright © 2019 XingJian Li. All rights reserved.
//

import UIKit

class moreBanlirenTableViewCell: UITableViewCell {
    
    var banlirenImageView:UIImageView!
    var nameLabel : UILabel!
    var positionLabel:UILabel!
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    func lauoutUI(){
        
        banlirenImageView = UIImageView()
        
       banlirenImageView.backgroundColor = UIColor.groupTableViewBackground
        
        
                    banlirenImageView.layer.cornerRadius = 20
                    banlirenImageView.layer.masksToBounds = true
        self.contentView.addSubview(banlirenImageView)
        
        
        nameLabel = UILabel()
        nameLabel.text = "名字"
      
        nameLabel.font = UIFont.systemFont(ofSize:20)//一般方法
        self.contentView.addSubview(nameLabel)
        
        positionLabel = UILabel()
        positionLabel.text = "名字11111"
        positionLabel.textColor = UIColor.gray
      
        positionLabel.font = UIFont.systemFont(ofSize:15)//一般方法
        self.contentView.addSubview(positionLabel)
        
        
        
        self.layoutViews()
    }
    
    
    func layoutViews() {
        
        
        self.banlirenImageView.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(5)
            make.left.equalTo(self.snp.left).offset(10)
            make.width.equalTo(50)
            make.height.equalTo(50)
        }
        
        self.nameLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(5)
            make.left.equalTo(self.banlirenImageView.snp.right).offset(10)
            make.right.equalTo(self.snp.right).offset(-10)
            make.height.equalTo(30)
        }
        
        self.positionLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.nameLabel.snp.bottom).offset(0)
            make.left.equalTo(self.banlirenImageView.snp.right).offset(10)
            make.right.equalTo(self.snp.right).offset(-10)
            make.height.equalTo(20)
        }
    }
    
 

}
